<template>
  <el-card class="app-container">
    <c-u-r-d-table :option="option"/>
  </el-card>
</template>

<script>

import ColumnType from '@/framework/constant/ColumnType'
import ChargeTypeEnum from '@/feature/pdt/infra/constants/ChargeTypeEnum'
import YesNoEnum from '@/infra/constant/YesNoEnum'
import { freightTemplateFeeAreaApi } from '@/feature/pdt/infra/api/freightTemplateFeeAreaApi'
import CURDTable from '@/framework/components/table/CURDTable'

export default {
  components: { CURDTable },
  data() {
    return {
      option: {
        requestApi: freightTemplateFeeAreaApi,
        columns: [
          {
            label: '',
            prop: 'templateId',
            searchable: true,
            type: ColumnType.SELECT
          },
          {
            label: '区域名称',
            prop: 'feeArea'
          },
          {
            label: '计费方式',
            prop: 'chargeType',
            type: ColumnType.RADIO,
            options: ChargeTypeEnum
          },
          {
            label: '首重kg',
            prop: 'firstWeight'
          },
          {
            label: '首费（元）',
            prop: 'firstFee'
          },
          {
            label: '续重（元）',
            prop: 'continueWeight'
          },
          {
            label: '续费（元）',
            prop: 'continueFee'
          },
          {
            label: '指定条件包邮',
            prop: 'condFreeFlag',
            type: ColumnType.RADIO,
            options: YesNoEnum
          },
          {
            label: '满多少件包邮',
            prop: 'condFreeNum',
            type: ColumnType.NUMBER
          },
          {
            label: '创建时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtCreate'
          },
          {
            label: '修改时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtModified'
          }
        ]
      }
    }
  },
  methods: {}
}
</script>

